//导入 produce 函数
const {produce} = require('immer');

const baseState = [
  {
      title: "Learn TypeScript",
      done: true
  },
  {
      title: "Try Immer",
      done: false
  }
];

const nextState = produce(baseState, state => {
  state[0].title = '学习 TypeScript';
});

console.log(nextState === baseState);




